namespace SmartMathLibrary
{
    /// <summary>
    /// Interface to implement a GeneralComplexVector class.
    /// </summary>
    public interface IGeneralComplexVector
    {
        /// <summary>
        /// Gets or sets the components of the complex vector.
        /// </summary>
        /// <value>The components of the complex vector.</value>
        ComplexNumber[] VectorData { get; set; }

        /// <summary>
        /// Counts the components of the complex vector.
        /// </summary>
        /// <value>The components of the complex vector.</value>
        int Count { get; }

        /// <summary>
        /// Gets or sets the <see cref="SmartMathLibrary.ComplexNumber"/> at the specified index.
        /// </summary>
        /// <value>The complex component of the vector at the specified position.</value>
        ComplexNumber this[int index] { get; set; }

        /// <summary>
        /// Extracts the real number part of the complex number values into a new vector.
        /// </summary>
        /// <returns>The real number part of the complex number values.</returns>
        GeneralVector ExtractRealNumberPartVector();

        /// <summary>
        /// Extracts the imaginary number part of the complex number values into a new vector.
        /// </summary>
        /// <returns>The imaginary number part of the complex number values.</returns>
        GeneralVector ExtractImaginaryNumberPartVector();

        /// <summary>
        /// Gets the component value.
        /// </summary>
        /// <param name="index">The index of the component.</param>
        /// <returns>The vector component value at the over given index</returns>
        ComplexNumber GetComponent(int index);

        /// <summary>
        /// Sets the component value at a specified position.
        /// </summary>
        /// <param name="index">The index of the component.</param>
        /// <param name="value">The new value of the component.</param>
        void SetComponent(int index, ComplexNumber value);

        /// <summary>
        /// Counts the components of the vector.
        /// </summary>
        /// <value>The number of components of the vector.</value>
        GeneralComplexVector Copy();

        /// <summary>
        /// Converts the current instance of the vector to a row matrix.
        /// </summary>
        /// <returns>The converted matrix.</returns>
        ComplexMatrix ToMatrix();

        /// <summary>
        /// Converts the data of the vector to an array of complex numbers.
        /// </summary>
        /// <returns>An array of complex numbers.</returns>
        ComplexNumber[] ToArray();
    }
}